package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Date;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallExchangeReceiveGetResponse;

/**
 * TOP API: tmall.exchange.receive.get request
 * 
 * @author top auto create
 * @since 1.0, 2018.08.09
 */
public class TmallExchangeReceiveGetRequest extends BaseTaobaoRequest<TmallExchangeReceiveGetResponse> {
	
	

	/** 
	* 正向订单号
	 */
	private Long bizOrderId;

	/** 
	* 买家id
	 */
	private Long buyerId;

	/** 
	* 买家昵称
	 */
	private String buyerNick;

	/** 
	* 换货状态，具体包括：换货待处理(1), 待买家退货(2), 买家已退货，待收货(3),  换货关闭(4), 换货成功(5), 待买家修改(6), 待发出换货商品(12), 待买家收货(13), 请退款(14)
	 */
	private String disputeStatusArray;

	/** 
	* 查询申请时间段的结束时间点
	 */
	private Date endCreatedTime;

	/** 
	* 查询修改时间段的结束时间点
	 */
	private Date endGmtModifedTime;

	/** 
	* 返回字段。目前支持dispute_id, bizorder_id, num, buyer_nick, status, created, modified, reason, title, buyer_logistic_no, seller_logistic_no, bought_sku, exchange_sku, buyer_address, address, buyer_phone, buyer_logistic_name, seller_logistic_name, alipay_no, buyer_name, seller_nick
	 */
	private String fields;

	/** 
	* 快递单号
	 */
	private String logisticNo;

	/** 
	* 页码
	 */
	private Long pageNo;

	/** 
	* 每页条数
	 */
	private Long pageSize;

	/** 
	* 退款单号ID列表，最多只能输入20个id
	 */
	private String refundIdArray;

	/** 
	* 查询申请时间段的开始时间点
	 */
	private Date startCreatedTime;

	/** 
	* 查询修改时间段的开始时间点
	 */
	private Date startGmtModifiedTime;

	public void setBizOrderId(Long bizOrderId) {
		this.bizOrderId = bizOrderId;
	}

	public Long getBizOrderId() {
		return this.bizOrderId;
	}

	public void setBuyerId(Long buyerId) {
		this.buyerId = buyerId;
	}

	public Long getBuyerId() {
		return this.buyerId;
	}

	public void setBuyerNick(String buyerNick) {
		this.buyerNick = buyerNick;
	}

	public String getBuyerNick() {
		return this.buyerNick;
	}

	public void setDisputeStatusArray(String disputeStatusArray) {
		this.disputeStatusArray = disputeStatusArray;
	}

	public String getDisputeStatusArray() {
		return this.disputeStatusArray;
	}

	public void setEndCreatedTime(Date endCreatedTime) {
		this.endCreatedTime = endCreatedTime;
	}

	public Date getEndCreatedTime() {
		return this.endCreatedTime;
	}

	public void setEndGmtModifedTime(Date endGmtModifedTime) {
		this.endGmtModifedTime = endGmtModifedTime;
	}

	public Date getEndGmtModifedTime() {
		return this.endGmtModifedTime;
	}

	public void setFields(String fields) {
		this.fields = fields;
	}

	public String getFields() {
		return this.fields;
	}

	public void setLogisticNo(String logisticNo) {
		this.logisticNo = logisticNo;
	}

	public String getLogisticNo() {
		return this.logisticNo;
	}

	public void setPageNo(Long pageNo) {
		this.pageNo = pageNo;
	}

	public Long getPageNo() {
		return this.pageNo;
	}

	public void setPageSize(Long pageSize) {
		this.pageSize = pageSize;
	}

	public Long getPageSize() {
		return this.pageSize;
	}

	public void setRefundIdArray(String refundIdArray) {
		this.refundIdArray = refundIdArray;
	}

	public String getRefundIdArray() {
		return this.refundIdArray;
	}

	public void setStartCreatedTime(Date startCreatedTime) {
		this.startCreatedTime = startCreatedTime;
	}

	public Date getStartCreatedTime() {
		return this.startCreatedTime;
	}

	public void setStartGmtModifiedTime(Date startGmtModifiedTime) {
		this.startGmtModifiedTime = startGmtModifiedTime;
	}

	public Date getStartGmtModifiedTime() {
		return this.startGmtModifiedTime;
	}

	public String getApiMethodName() {
		return "tmall.exchange.receive.get";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("biz_order_id", this.bizOrderId);
		txtParams.put("buyer_id", this.buyerId);
		txtParams.put("buyer_nick", this.buyerNick);
		txtParams.put("dispute_status_array", this.disputeStatusArray);
		txtParams.put("end_created_time", this.endCreatedTime);
		txtParams.put("end_gmt_modifed_time", this.endGmtModifedTime);
		txtParams.put("fields", this.fields);
		txtParams.put("logistic_no", this.logisticNo);
		txtParams.put("page_no", this.pageNo);
		txtParams.put("page_size", this.pageSize);
		txtParams.put("refund_id_array", this.refundIdArray);
		txtParams.put("start_created_time", this.startCreatedTime);
		txtParams.put("start_gmt_modified_time", this.startGmtModifiedTime);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallExchangeReceiveGetResponse> getResponseClass() {
		return TmallExchangeReceiveGetResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkMaxListSize(disputeStatusArray, 20, "disputeStatusArray");
		RequestCheckUtils.checkNotEmpty(fields, "fields");
		RequestCheckUtils.checkMaxListSize(fields, 100, "fields");
		RequestCheckUtils.checkMaxListSize(refundIdArray, 20, "refundIdArray");
	}
	

}